# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-timeout-decorator
pkgver=0.5.0
pkgrel=4
pkgdesc="Timeout decorator"
url="https://github.com/pnpnpn/timeout-decorator"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/t/timeout-decorator/timeout-decorator-$pkgver.tar.gz"
# No tests in Pypi package and no proper git tags to use
# https://github.com/pnpnpn/timeout-decorator/issues/60
options="!check"
builddir="$srcdir/timeout-decorator-$pkgver"

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="ee6d47a27ad3ed7921bc5b98391c4f933e247dc3834c9571248bf2a3b0237acaad88daa8b071eb8d443f74c792318b5be5bb9fad99fa99df682198f90cd86b1b  timeout-decorator-0.5.0.tar.gz"
